package com.cskaoyan.crud;

import com.cskaoyan.bean.User;
import com.cskaoyan.mapper.UserMapper;
import com.cskaoyan.utils.MybatisUtils;
import org.apache.ibatis.session.SqlSession;

/**
 * 创建日期: 2022/10/14 17:26
 *
 * @author ciggar
 */
public class QueryDemo {


    public static void main(String[] args) {

        SqlSession sqlSession = MybatisUtils.getSqlSession();

        UserMapper mapper = sqlSession.getMapper(UserMapper.class);

//        User user = mapper.selectUserById(1002);

//        System.out.println(user);


        String name = mapper.selectUserNameById(1002);

        System.out.println(name);


    }
}
